import java.util.Arrays;
import java.util.Scanner;

public class LQB_10 {

    static int[] a             = new int[]{1,     1,         2};
    static boolean[] visit = new boolean[]{true, false, false};
    static boolean[] unique = new boolean[3];

    public static void main(String[] args) {
        duplicateRemoval(a);
        System.out.println("Arrays.toString(unique) = " + Arrays.toString(unique));
    }

    public static void duplicateRemoval(int[] nums){
        for (int i = 0; i < unique.length; i++) {
            if(visit[i])
                unique[i] = visit[i];
            else
                unique[i] = false;
        }
        System.out.println("unique = " + Arrays.toString(unique));
        for (int i = 0; i < unique.length; i++) {
            if(unique[i] == true){
                continue;
            }
            int num = nums[i];
            for (int j = i+1; j < unique.length; j++) {
                if(num == nums[j])
                    unique[j] = true;
            }
        }
    }
}
